package com.hucheng.goods.mapper;

import com.hucheng.goods.entity.CartDO;
import com.hucheng.goods.query.CartQuery;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author: 凉白开不加冰
 * @Version: 0.0.1V
 * @Date: 2019-07-22
 * @Description: 购物车持久层
 **/
@Mapper
public interface CartMapper {
    void insert(CartDO cartDO);

    List<CartDO> list(CartQuery cartQuery);

    Integer count(CartQuery cartQuery);

    CartDO get(@Param("userId") Integer userId,@Param("goodsId") Integer goodsId);

    void update(CartDO cartDO);

    void del(@Param("userId") Integer userId,@Param("cartId") Integer cartId);
}
